package com.allwees.bs.c.module.ops.repository;

import com.allwees.bs.c.module.base.repository.BaseRepository;
import com.allwees.bs.c.module.ops.entity.PromoActiveDefEntity;
import com.allwees.bs.core.model.coupon.constant.EPromoUseType;
import org.springframework.data.jpa.repository.Query;

public interface PromoActiveDefRepository extends BaseRepository<PromoActiveDefEntity, Integer> {

    @Query(value = "select t from PromoActiveDefEntity t where isDeleted = 0 and useType=:useType")
    PromoActiveDefEntity findByUseType(EPromoUseType useType);
}
